﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="getrelative.aspx.cs" Inherits="School.Pages.Admission.getrelative" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" href="../Css/style.css" type="text/css" />
</head>
<body dir="rtl">
    <form id="form1" runat="server">
    <div>
        <table width="90%" align="center" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td>
                    <div align="center">
                        <asp:Panel ID="pnlbrows" runat="server" Visible="true">
                            <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td class="admintitle">
                                        عرض البيانات
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table width="90%" align="center" cellpadding="0" cellspacing="0" border="0">
                                            <tr>
                                                <td>
                                                    رقم القيد
                                                </td>
                                                <td align="right">
                                                    <asp:TextBox ID="txtSearchRegistrationNumber" runat="server" CssClass="text" Width="150px"></asp:TextBox>
                                                </td>
                                                <td>
                                                    رقم الملف
                                                </td>
                                                <td align="right">
                                                    <asp:TextBox ID="txtSearchFileNumber" runat="server" CssClass="text" Width="150px"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="lblFirstname1" runat="server" CssClass="lab" Text="الاسم"></asp:Label>
                                                </td>
                                                <td align="right">
                                                    <asp:TextBox ID="txtSearchName" runat="server" CssClass="text" Width="150px"></asp:TextBox>
                                                </td>
                                                <td>
                                                    <asp:Label ID="Label2" runat="server" CssClass="lab" Text="المجمع"></asp:Label>
                                                </td>
                                                <td align="right">
                                                    <asp:DropDownList ID="ddlSearchcampus_Id" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSearchcampus_Id_SelectedIndexChanged1"
                                                        Width="200px">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td align="right" rowspan="3">
                                                    <asp:RadioButtonList ID="rblSearchType" runat="server">
                                                        <asp:ListItem Selected="True" Text="بداية الاسم" Value="0"></asp:ListItem>
                                                        <asp:ListItem Text="اي جزء من الاسم" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="مطابق" Value="2"></asp:ListItem>
                                                    </asp:RadioButtonList>
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblCertificate_Id0" runat="server" CssClass="lab" Text="نوع الشهادة"></asp:Label>
                                                </td>
                                                <td align="right">
                                                    <asp:DropDownList ID="ddlSearchCertificate_Id" runat="server" AutoPostBack="True"
                                                        Enabled="False" OnSelectedIndexChanged="ddlSearchCertificate_Id_SelectedIndexChanged"
                                                        Width="200px">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblStage_Id0" runat="server" CssClass="lab" Text="مرحلة القيد"></asp:Label>
                                                </td>
                                                <td align="right">
                                                    <asp:DropDownList ID="ddlSearchStage_Id" runat="server" AutoPostBack="True" Enabled="False"
                                                        OnSelectedIndexChanged="ddlSearchStage_Id_SelectedIndexChanged" Width="200px">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 22px">
                                                    &nbsp;
                                                </td>
                                                <td style="height: 22px">
                                                    <asp:Label ID="lblGrade_Id0" runat="server" CssClass="lab" Text="الصف"></asp:Label>
                                                </td>
                                                <td align="right" style="height: 22px">
                                                    <asp:DropDownList ID="ddlSearchGrade_ID" runat="server" AutoPostBack="True" Enabled="False"
                                                        Width="200px">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox1_CheckedChanged"
                                                        Text="اولياء الأمور" />
                                                </td>
                                                <td colspan="2">
                                                    <asp:RadioButtonList ID="rblRelatives" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rblRelatives_SelectedIndexChanged"
                                                        RepeatDirection="Horizontal">
                                                        <asp:ListItem Text="الأب" Value="0"></asp:ListItem>
                                                        <asp:ListItem Text="الأم" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="الواصي" Value="2"></asp:ListItem>
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td colspan="3" rowspan="4">
                                                    <asp:Panel ID="pnl2" runat="server" Visible="false">
                                                        <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
                                                            <tr>
                                                                <td>
                                                                    <fieldset>
                                                                        <legend>البيانات الشخصية</legend>
                                                                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="table_text"
                                                                            width="90%">
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblFAr_FirstName" runat="server" CssClass="lab" Text="الاسم"></asp:Label>
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:TextBox ID="txtRelativeName" runat="server" CssClass="text" Width="233px"></asp:TextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    &nbsp;
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:RadioButtonList ID="rblSearchType0" runat="server" RepeatDirection="Horizontal">
                                                                                        <asp:ListItem Selected="True" Text="بداية الاسم" Value="0"></asp:ListItem>
                                                                                        <asp:ListItem Text="اي جزء من الاسم" Value="1"></asp:ListItem>
                                                                                        <asp:ListItem Text="مطابق" Value="2"></asp:ListItem>
                                                                                    </asp:RadioButtonList>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblFCountry_Id" runat="server" CssClass="lableface" Text="الجنسية"></asp:Label>
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:DropDownList ID="ddlSearchNationality_Id" runat="server" AutoPostBack="True"
                                                                                        Width="200px">
                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </fieldset>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <fieldset>
                                                                        <legend>بيانات المؤهل العلمي</legend>
                                                                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="table_text"
                                                                            width="80%">
                                                                            <tr>
                                                                                <td width="114">
                                                                                    <asp:Label ID="lblFQualification_Id" runat="server" CssClass="lab" Text="المؤهل العلمي"></asp:Label>
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:DropDownList ID="ddlFQualification_Id" runat="server" CssClass="text" Width="200px">
                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblFSpecialization" runat="server" CssClass="lab" Text="التخصص"></asp:Label>
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:TextBox ID="txtFSpecialization" runat="server" CssClass="text" Width="200px"></asp:TextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblFPointOfGraduation" runat="server" CssClass="lab" Text="جهة التخرج"></asp:Label>
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:TextBox ID="txtFPointOfGraduation" runat="server" CssClass="text" Width="200px"></asp:TextBox>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </fieldset>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <fieldset>
                                                                        <legend>بيانات العمل</legend>
                                                                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="table_text"
                                                                            width="80%">
                                                                            <tr>
                                                                                <td width="114">
                                                                                    <asp:Label ID="lblFCareer" runat="server" CssClass="lab" Text="الوظيفة"></asp:Label>
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:DropDownList ID="ddlFCareer" runat="server" CssClass="text" Width="200px">
                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblFCompanyName" runat="server" CssClass="lab" Text="الشركة"></asp:Label>
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:TextBox ID="txtFCompanyName" runat="server" CssClass="text" Width="200px"></asp:TextBox>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </fieldset>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <fieldset>
                                                                        <legend>بيانات السكن</legend>
                                                                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="table_text"
                                                                            width="80%">
                                                                            <tr>
                                                                                <td width="144">
                                                                                    الشارع
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:TextBox ID="txtStreetName" runat="server" CssClass="text" Width="200px"></asp:TextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td width="144">
                                                                                    <asp:Label ID="Label5" runat="server" CssClass="lab" Text="المنطقة"></asp:Label>
                                                                                </td>
                                                                                <td align="right">
                                                                                    <asp:DropDownList ID="ddlDistrict_Id" runat="server" CssClass="text" Width="100px">
                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </fieldset>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <asp:Panel ID="pnl4" runat="server" Visible="false">
                                                                        <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                            <tr>
                                                                                <td>
                                                                                    <fieldset>
                                                                                        <legend>صلة قرابة الوصي </legend>
                                                                                        <table align="center" border="0" cellpadding="0" cellspacing="0" class="table_text"
                                                                                            width="80%">
                                                                                            <tr>
                                                                                                <td width="114">
                                                                                                    <asp:Label ID="lblCParentsSocialStatus_Id" runat="server" CssClass="lableface" Text="الحالة الاجتماعية"></asp:Label>
                                                                                                </td>
                                                                                                <td align="right">
                                                                                                    <asp:DropDownList ID="ddlParentsSocialStatus_Id" runat="server" CssClass="text" Width="100px">
                                                                                                    </asp:DropDownList>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td>
                                                                                                    <asp:Label ID="lblCCustodyType_Id" runat="server" CssClass="lableface" Text="الوصي علي الطالب"></asp:Label>
                                                                                                </td>
                                                                                                <td align="right">
                                                                                                    <asp:DropDownList ID="ddlCustodyType_Id" runat="server" CssClass="text" Width="100px">
                                                                                                    </asp:DropDownList>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td>
                                                                                                    <asp:Label ID="lblCStudentLivingPlace_Id" runat="server" CssClass="lableface" Text="اين يعيش الطالب"></asp:Label>
                                                                                                </td>
                                                                                                <td align="right">
                                                                                                    <asp:DropDownList ID="ddlStudentLivingPlace_Id" runat="server" CssClass="text" Width="100px">
                                                                                                    </asp:DropDownList>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td colspan="2">
                                                                                                    <asp:Label ID="lblCtitile" runat="server" CssClass="lableface" Text="اذا كان الواصي او يعيش الطالب مع شخص اخر غير الاب و الام"></asp:Label>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td>
                                                                                                    <asp:Label ID="lblCRelationToStudent" runat="server" CssClass="lableface" Text="العلاقة بالطالب"></asp:Label>
                                                                                                </td>
                                                                                                <td align="right">
                                                                                                    <asp:TextBox ID="txtCRelationToStudent" runat="server" CssClass="text" Width="200px"></asp:TextBox>
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                    </fieldset>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </asp:Panel>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </asp:Panel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4">
                                                    <asp:Button ID="btnSearch" runat="server" Text="بحث" CssClass="graybutton" OnClick="btnSearch_Click" />
                                                    &nbsp;&nbsp;<asp:Button ID="btnGetAll" runat="server" Text="الكل" CssClass="graybutton"
                                                        OnClick="btnGetAll_Click" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="text-align: right" colspan="4">
                                                    <asp:Label CssClass="title" ID="lblRecordNo" runat="server"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4">
                                                    <asp:GridView PageSize="3" Width="100%" AllowPaging="True" AllowSorting="True" ID="griddata" runat="server"
                                                        CssClass="Grid" HeaderStyle-CssClass="GridHeaderFooter" FooterStyle-CssClass="GridHeaderFooter"
                                                        PagerStyle-CssClass="GridPager" AlternatingRowStyle-CssClass="GridItemAltername"
                                                        AutoGenerateColumns="False" OnSelectedIndexChanged="griddata_SelectedIndexChanged"
                                                        DataKeyNames="Id" OnPageIndexChanging="griddata_PageIndexChanging">
                                                        <AlternatingRowStyle CssClass="GridItemAltername" />
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="Student_ID" Visible="False">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblStudent_Id" runat="server" Text='<%# Bind("Id") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="RegistrationNumber" HeaderText="رقم القيد" />
                                                            <asp:BoundField DataField="FileNumber" HeaderText="رقم الملف" />
                                                            <asp:TemplateField HeaderText="الاسم الكامل">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Ar_FirstName").ToString() + " " + Eval("Ar_SecondName").ToString() + " " + Eval("Ar_ThirdNmae").ToString()+ " " + Eval("Ar_FourthName").ToString() %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:CommandField ShowSelectButton="True" SelectText="View" />
                                                            <asp:TemplateField>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <FooterStyle CssClass="GridHeaderFooter" />
                                                        <HeaderStyle CssClass="GridHeaderFooter" />
                                                        <PagerStyle CssClass="GridPager" />
                                                    </asp:GridView>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4">
                                                    <asp:Button ID="btnaddstid" runat="server" Text="اضافة اقارب الطالب" CssClass="graybutton"
                                                        OnClick="btnaddstid_Click" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4">
                                                    <asp:Label CssClass="error" ID="lblMessage" runat="server"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4" align="right">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="pnldetails" runat="server" Visible="false">
                        <div align="center" id="DivContent2">
                            <table align="center" cellpadding="0" cellspacing="0" border="0" width="90%" dir="rtl">
                                <tr>
                                    <td class="admintitle">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:DetailsView Width="100%" ID="DetViewdata" runat="server" AlternatingRowStyle-CssClass="GridItemAltername"
                                            CssClass="Grid" HeaderStyle-CssClass="GridHeaderFooter" HeaderStyle-Width="30%"
                                            AutoGenerateRows="False">
                                            <AlternatingRowStyle CssClass="GridItemAltername" />
                                            <Fields>
                                                <asp:BoundField DataField="FileNumber" HeaderText="رقم أمر الدفع" />
                                                <asp:BoundField DataField="RegistrationNumber" HeaderText="التاريخ" />
                                                <asp:BoundField DataField="Ar_FirstName" HeaderText="االاسم الاول" />
                                            </Fields>
                                            <HeaderStyle CssClass="GridHeaderFooter" Width="30%" />
                                        </asp:DetailsView>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <table align="center" cellpadding="0" cellspacing="0" border="0" width="50%" dir="rtl">
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    <input type="button" value="رجوع" onclick="history.go(-1)" class="graybutton" />
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
